package com.study.common.enumerate;

import org.apache.shiro.web.session.HttpServletSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.Locale;
import java.util.ResourceBundle;

/**
 * @Author 谭永超 [www.tanyongchao.tk:8090/SumDome/index]
 * @Date 2018/8/29 17:00
 * @Description 错误信息管理枚举
 */
public enum ExceptionInfo {

    UNKNOW_EXCEPTION(-1, ""),
    SUCCESS(1, "SUCCESS"),
    ENTER_EXCEPTION(100, "输入值错误"),
    DATE_CHANGE(101, "时间格式转换错误"),
    SENDMSG(102, "短信发送失败"),
    FAILURE(103, "登陆失败"),
    SELECT_ERROR(104, "sql语句异常"),
    FORMAT_ERROR(106, "格式错误"),
    PASSWORD_ERROR(109, "密码格式错误"),
    ACCOUNT_ERROR(107, "账户格式错误"),
    EMAIL_ERROR(108, "邮箱格式错误"),
    GITLAB_ERROR(110, "gitlab账户格式错误"),
    CHINESENAME_ERROR(111, "中文名格式错误"),
    TELNUMBER_ERROR(112, "电话号码格式错误"),
    ERROR(105, "导出异常");
    // 状态
    private Integer statue;
    // 信息
    private String message;

    public Integer getStatue() {
        return statue;
    }

    public void setStatue(Integer statue) {
        this.statue = statue;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    ExceptionInfo(Integer statue, String info) {
        this.statue = statue;
        this.message = info;
    }
}